#pragma once

#include "MBDataTypes.h"
#include "MBEnums.h"

#include <string>
#include <vector>

/**
  *	Base class for the available triangle labeler based project options
  */
class MBTriangleLabelerBasedProjectOptions
{
public:
	/**
	  *	Returns an enum value specifying the chosen based project format
	  *
	  * @return enum value specifying the chosen based project format
	  */
	const MBBasedProjectFormat &GetBasedProjectFormat( void ) const
	{
		return mBasedProjectFormat;
	}

	/**
	  *	Returns the radius of the used image area in vertical direction, 1.0 is from midpoint to the top
	  *
	  * @return radius of the used image area in vertical direction, 1.0 is from midpoint to the top
	  */
	const double &GetVerticalUsedImageAreaRadius( void ) const
	{
		return mVerticalUsedImageAreaRadius;
	}

	/**
	  *	Returns a vector that includes the names of all the names (not paths!)
	  * of the images that are used exclusively in the labeling procedure
	  *
	  * @return vector that includes the names of all the names (not paths!) of the images that are used exclusively in the labeling procedure
	  */
	const std::vector<std::string> &GetExclusiveImageNames( void ) const
	{
		return mExclusiveImageNames;
	}

	/**
	  *	Returns the image-mask base path 
	  *
	  * @return image-mask base path that is used as the origin of all the masks of the used images in the labeling procedure
	  */
	const std::string &GetImageMaskBasePath( void ) const
	{
		return mImageMaskBasePath;
	}

protected:
	MBTriangleLabelerBasedProjectOptions(
		const MBBasedProjectFormat &basedProjectFormat,
		const double &verticalUsedImageAreaRadius,
		const std::vector<std::string> &exclusiveImageNames = std::vector<std::string>(),
		const std::string &imagemaskPath = std::string()) :
		mBasedProjectFormat( basedProjectFormat ),
		mVerticalUsedImageAreaRadius( verticalUsedImageAreaRadius ),
		mExclusiveImageNames( exclusiveImageNames ),
		mImageMaskBasePath( imagemaskPath )
	{
	}

private:
	/** Enum value specifying the chosen based project format */
	MBBasedProjectFormat mBasedProjectFormat;
	/** Radius of the used image area in vertical direction, 1.0 is from midpoint to the top */
	double mVerticalUsedImageAreaRadius;
	/** vector that includes the names of all the names (not paths!) of the images that are used exclusively in the labeling procedure */
	std::vector<std::string> mExclusiveImageNames;
	/** path to the directory where the masks for the input images are stored
		each mask has the same name as its associated image */
	std::string mImageMaskBasePath;
};

class MBTriangleLabelerBasedProjectOptionsRiScanPro : public MBTriangleLabelerBasedProjectOptions
{
public:
	MBTriangleLabelerBasedProjectOptionsRiScanPro(
		const std::string &rspFilePath,
		const MBRieglImageType &rieglImageType,
		const double &verticalUsedImageAreaRadius = -1.0,
		const std::vector<std::string> &exclusiveImageNames = std::vector<std::string>(),
		const std::string &imagemaskPath = std::string()) :
		MBTriangleLabelerBasedProjectOptions( MB_BASED_PROJECT_FORMAT_RISCAN_PRO, verticalUsedImageAreaRadius, exclusiveImageNames, imagemaskPath ),
		mRspFilePath( rspFilePath ),
		mRieglImageType( rieglImageType )
	{
	}

	const std::string &GetRspFilePath( void ) const
	{
		return mRspFilePath;
	}

	const MBRieglImageType &GetRieglImageType( void ) const
	{
		return mRieglImageType;
	}

private:
	/** Full path of the RiScan Pro project file */
	std::string mRspFilePath;
	/** Enum value specifying the used images of the RiScan project (distorted or undistorted) */
	MBRieglImageType mRieglImageType;
};

class MBTriangleLabelerBasedProjectOptionsAdamtec : public MBTriangleLabelerBasedProjectOptions
{
public:
	MBTriangleLabelerBasedProjectOptionsAdamtec(
		const std::string &imageBasePath,
		const std::vector<std::string> &exclusiveImageNames = std::vector<std::string>(),
		const double &verticalUsedImageAreaRadius = -1.0,
		const std::string &imagemaskPath = std::string()) :
	MBTriangleLabelerBasedProjectOptions( MB_BASED_PROJECT_FORMAT_ADAMTECH, verticalUsedImageAreaRadius, exclusiveImageNames, imagemaskPath ),
		mImageBasePath( imageBasePath )
	{
	}

	/**
	  *	Returns the image base path that is used as the origin of all the used
	  * images in the labeling procedure.
	  *
	  * @return image base path that is used as the origin of all the used images in the labeling procedure
	  */
	const std::string &GetImageBasePath( void ) const
	{
		return mImageBasePath;
	}

private:
	/** image base path that is used as the origin of all the used images in the labeling procedure */
	std::string mImageBasePath;
};